<h4>Class Activation Atlas for “{$inceptionLabels[$currentClassAtlasIndex]}” from mixed5b</h4>
<div ref:root>
  <div style="position: relative;">
    <ClassAtlas classFilter={$currentClassAtlasIndex}/>
  </div>
  <div class="chooser-container">
    <div class="chooser">
      {#each $classAtlasIndices as c}
        <label class="{$currentClassAtlasIndex === c ? 'selected' : ''}" title="{c}">
          <input type=radio bind:group=$currentClassAtlasIndex value={c}>
          {$inceptionLabels[c]}
        </label>
      {/each}
    </div>
  </div>
</div>
<div style="margin-top: 16px;">
  <NotebookLink url="https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/activation-atlas/class-activation-atlas.ipynb"/>
</div>

<script>
import classesToKeep from './../classesToKeep.js';
export default {
  components: { 
    ClassAtlas: "./ClassAtlas.html",
    NotebookLink: "../library/NotebookLink.html"
  },
  data() {
    return {
      layout: 0,
    }
  },
  computed: {
    // classes: ({$classChoices}) => classesToKeep
  }
}
</script>

<style>
  ref:root {
    position: relative;
  }
  h4 {
    margin-top: 0;
  }
  button {
    display: block;
    width: 100%;
  }
  .chooser-container {
    overflow-x: hidden;
    overflow-y: scroll;
    min-height: 160px;
    height: 100%;
    position: relative;
  }

  .chooser {
    position: absolute;
    border-left: solid 1px #ddd;
    width: 100%;
  }
  .chooser label {
    position: relative;
    font-size: 10px;
    line-height: 1em;
    display: block;
    border-left: solid 3px white;
    padding: 5px 5px 5px 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-x: hidden;
  }
  .chooser label input {
    position: absolute;
    opacity: 0;
  }
  .chooser label:hover {
    background-color: rgba(255, 130, 0, 0.04);
  }
  .chooser label.selected {
    border-left-color: rgb(255, 130, 0);
    color: rgb(255, 130, 0);
    background-color: rgba(255, 130, 0, 0.08);
    font-weight: bold;
  }
  @media(min-width: 600px) {
    ref:root {
      position: relative;
      display: grid;
      grid-template-columns: 4fr 1fr;
      grid-gap: 20px;
    }
  }
</style>
